/**
 * Copyright (c) 2013-2022, Alibaba Group Holding Limited;
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * </p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: TxnStream.proto

package com.aliyun.polardbx.binlog.protocol;

/**
 * Protobuf type {@code com.aliyun.polardbx.binlog.protocol.DumpReply}
 */
public final class DumpReply extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.aliyun.polardbx.binlog.protocol.DumpReply)
    DumpReplyOrBuilder {
private static final long serialVersionUID = 0L;
  // Use DumpReply.newBuilder() to construct.
  private DumpReply(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private DumpReply() {
    txnMessage_ = java.util.Collections.emptyList();
    txnMessageBytes_ = java.util.Collections.emptyList();
    packetMode_ = 0;
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new DumpReply();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private DumpReply(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              txnMessage_ = new java.util.ArrayList<com.aliyun.polardbx.binlog.protocol.TxnMessage>();
              mutable_bitField0_ |= 0x00000001;
            }
            txnMessage_.add(
                input.readMessage(com.aliyun.polardbx.binlog.protocol.TxnMessage.parser(), extensionRegistry));
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000002) != 0)) {
              txnMessageBytes_ = new java.util.ArrayList<com.google.protobuf.ByteString>();
              mutable_bitField0_ |= 0x00000002;
            }
            txnMessageBytes_.add(input.readBytes());
            break;
          }
          case 24: {
            int rawValue = input.readEnum();

            packetMode_ = rawValue;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        txnMessage_ = java.util.Collections.unmodifiableList(txnMessage_);
      }
      if (((mutable_bitField0_ & 0x00000002) != 0)) {
        txnMessageBytes_ = java.util.Collections.unmodifiableList(txnMessageBytes_); // C
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.aliyun.polardbx.binlog.protocol.TxnStream.internal_static_com_aliyun_polardbx_binlog_protocol_DumpReply_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.aliyun.polardbx.binlog.protocol.TxnStream.internal_static_com_aliyun_polardbx_binlog_protocol_DumpReply_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.aliyun.polardbx.binlog.protocol.DumpReply.class, com.aliyun.polardbx.binlog.protocol.DumpReply.Builder.class);
  }

  public static final int TXNMESSAGE_FIELD_NUMBER = 1;
  private java.util.List<com.aliyun.polardbx.binlog.protocol.TxnMessage> txnMessage_;
  /**
   * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
   */
  @java.lang.Override
  public java.util.List<com.aliyun.polardbx.binlog.protocol.TxnMessage> getTxnMessageList() {
    return txnMessage_;
  }
  /**
   * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.aliyun.polardbx.binlog.protocol.TxnMessageOrBuilder> 
      getTxnMessageOrBuilderList() {
    return txnMessage_;
  }
  /**
   * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
   */
  @java.lang.Override
  public int getTxnMessageCount() {
    return txnMessage_.size();
  }
  /**
   * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
   */
  @java.lang.Override
  public com.aliyun.polardbx.binlog.protocol.TxnMessage getTxnMessage(int index) {
    return txnMessage_.get(index);
  }
  /**
   * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
   */
  @java.lang.Override
  public com.aliyun.polardbx.binlog.protocol.TxnMessageOrBuilder getTxnMessageOrBuilder(
      int index) {
    return txnMessage_.get(index);
  }

  public static final int TXNMESSAGEBYTES_FIELD_NUMBER = 2;
  private java.util.List<com.google.protobuf.ByteString> txnMessageBytes_;
  /**
   * <code>repeated bytes txnMessageBytes = 2;</code>
   * @return A list containing the txnMessageBytes.
   */
  @java.lang.Override
  public java.util.List<com.google.protobuf.ByteString>
      getTxnMessageBytesList() {
    return txnMessageBytes_;
  }
  /**
   * <code>repeated bytes txnMessageBytes = 2;</code>
   * @return The count of txnMessageBytes.
   */
  public int getTxnMessageBytesCount() {
    return txnMessageBytes_.size();
  }
  /**
   * <code>repeated bytes txnMessageBytes = 2;</code>
   * @param index The index of the element to return.
   * @return The txnMessageBytes at the given index.
   */
  public com.google.protobuf.ByteString getTxnMessageBytes(int index) {
    return txnMessageBytes_.get(index);
  }

  public static final int PACKETMODE_FIELD_NUMBER = 3;
  private int packetMode_;
  /**
   * <code>.com.aliyun.polardbx.binlog.protocol.PacketMode packetMode = 3;</code>
   * @return The enum numeric value on the wire for packetMode.
   */
  @java.lang.Override public int getPacketModeValue() {
    return packetMode_;
  }
  /**
   * <code>.com.aliyun.polardbx.binlog.protocol.PacketMode packetMode = 3;</code>
   * @return The packetMode.
   */
  @java.lang.Override public com.aliyun.polardbx.binlog.protocol.PacketMode getPacketMode() {
    @SuppressWarnings("deprecation")
    com.aliyun.polardbx.binlog.protocol.PacketMode result = com.aliyun.polardbx.binlog.protocol.PacketMode.valueOf(packetMode_);
    return result == null ? com.aliyun.polardbx.binlog.protocol.PacketMode.UNRECOGNIZED : result;
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    for (int i = 0; i < txnMessage_.size(); i++) {
      output.writeMessage(1, txnMessage_.get(i));
    }
    for (int i = 0; i < txnMessageBytes_.size(); i++) {
      output.writeBytes(2, txnMessageBytes_.get(i));
    }
    if (packetMode_ != com.aliyun.polardbx.binlog.protocol.PacketMode.OBJECT.getNumber()) {
      output.writeEnum(3, packetMode_);
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    for (int i = 0; i < txnMessage_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, txnMessage_.get(i));
    }
    {
      int dataSize = 0;
      for (int i = 0; i < txnMessageBytes_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream
          .computeBytesSizeNoTag(txnMessageBytes_.get(i));
      }
      size += dataSize;
      size += 1 * getTxnMessageBytesList().size();
    }
    if (packetMode_ != com.aliyun.polardbx.binlog.protocol.PacketMode.OBJECT.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(3, packetMode_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.aliyun.polardbx.binlog.protocol.DumpReply)) {
      return super.equals(obj);
    }
    com.aliyun.polardbx.binlog.protocol.DumpReply other = (com.aliyun.polardbx.binlog.protocol.DumpReply) obj;

    if (!getTxnMessageList()
        .equals(other.getTxnMessageList())) return false;
    if (!getTxnMessageBytesList()
        .equals(other.getTxnMessageBytesList())) return false;
    if (packetMode_ != other.packetMode_) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getTxnMessageCount() > 0) {
      hash = (37 * hash) + TXNMESSAGE_FIELD_NUMBER;
      hash = (53 * hash) + getTxnMessageList().hashCode();
    }
    if (getTxnMessageBytesCount() > 0) {
      hash = (37 * hash) + TXNMESSAGEBYTES_FIELD_NUMBER;
      hash = (53 * hash) + getTxnMessageBytesList().hashCode();
    }
    hash = (37 * hash) + PACKETMODE_FIELD_NUMBER;
    hash = (53 * hash) + packetMode_;
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.aliyun.polardbx.binlog.protocol.DumpReply parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.aliyun.polardbx.binlog.protocol.DumpReply prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code com.aliyun.polardbx.binlog.protocol.DumpReply}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.aliyun.polardbx.binlog.protocol.DumpReply)
      com.aliyun.polardbx.binlog.protocol.DumpReplyOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.aliyun.polardbx.binlog.protocol.TxnStream.internal_static_com_aliyun_polardbx_binlog_protocol_DumpReply_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.aliyun.polardbx.binlog.protocol.TxnStream.internal_static_com_aliyun_polardbx_binlog_protocol_DumpReply_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.aliyun.polardbx.binlog.protocol.DumpReply.class, com.aliyun.polardbx.binlog.protocol.DumpReply.Builder.class);
    }

    // Construct using com.aliyun.polardbx.binlog.protocol.DumpReply.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getTxnMessageFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (txnMessageBuilder_ == null) {
        txnMessage_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        txnMessageBuilder_.clear();
      }
      txnMessageBytes_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000002);
      packetMode_ = 0;

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.aliyun.polardbx.binlog.protocol.TxnStream.internal_static_com_aliyun_polardbx_binlog_protocol_DumpReply_descriptor;
    }

    @java.lang.Override
    public com.aliyun.polardbx.binlog.protocol.DumpReply getDefaultInstanceForType() {
      return com.aliyun.polardbx.binlog.protocol.DumpReply.getDefaultInstance();
    }

    @java.lang.Override
    public com.aliyun.polardbx.binlog.protocol.DumpReply build() {
      com.aliyun.polardbx.binlog.protocol.DumpReply result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.aliyun.polardbx.binlog.protocol.DumpReply buildPartial() {
      com.aliyun.polardbx.binlog.protocol.DumpReply result = new com.aliyun.polardbx.binlog.protocol.DumpReply(this);
      int from_bitField0_ = bitField0_;
      if (txnMessageBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          txnMessage_ = java.util.Collections.unmodifiableList(txnMessage_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.txnMessage_ = txnMessage_;
      } else {
        result.txnMessage_ = txnMessageBuilder_.build();
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        txnMessageBytes_ = java.util.Collections.unmodifiableList(txnMessageBytes_);
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.txnMessageBytes_ = txnMessageBytes_;
      result.packetMode_ = packetMode_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.aliyun.polardbx.binlog.protocol.DumpReply) {
        return mergeFrom((com.aliyun.polardbx.binlog.protocol.DumpReply)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.aliyun.polardbx.binlog.protocol.DumpReply other) {
      if (other == com.aliyun.polardbx.binlog.protocol.DumpReply.getDefaultInstance()) return this;
      if (txnMessageBuilder_ == null) {
        if (!other.txnMessage_.isEmpty()) {
          if (txnMessage_.isEmpty()) {
            txnMessage_ = other.txnMessage_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureTxnMessageIsMutable();
            txnMessage_.addAll(other.txnMessage_);
          }
          onChanged();
        }
      } else {
        if (!other.txnMessage_.isEmpty()) {
          if (txnMessageBuilder_.isEmpty()) {
            txnMessageBuilder_.dispose();
            txnMessageBuilder_ = null;
            txnMessage_ = other.txnMessage_;
            bitField0_ = (bitField0_ & ~0x00000001);
            txnMessageBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getTxnMessageFieldBuilder() : null;
          } else {
            txnMessageBuilder_.addAllMessages(other.txnMessage_);
          }
        }
      }
      if (!other.txnMessageBytes_.isEmpty()) {
        if (txnMessageBytes_.isEmpty()) {
          txnMessageBytes_ = other.txnMessageBytes_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureTxnMessageBytesIsMutable();
          txnMessageBytes_.addAll(other.txnMessageBytes_);
        }
        onChanged();
      }
      if (other.packetMode_ != 0) {
        setPacketModeValue(other.getPacketModeValue());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.aliyun.polardbx.binlog.protocol.DumpReply parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.aliyun.polardbx.binlog.protocol.DumpReply) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.util.List<com.aliyun.polardbx.binlog.protocol.TxnMessage> txnMessage_ =
      java.util.Collections.emptyList();
    private void ensureTxnMessageIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        txnMessage_ = new java.util.ArrayList<com.aliyun.polardbx.binlog.protocol.TxnMessage>(txnMessage_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.aliyun.polardbx.binlog.protocol.TxnMessage, com.aliyun.polardbx.binlog.protocol.TxnMessage.Builder, com.aliyun.polardbx.binlog.protocol.TxnMessageOrBuilder> txnMessageBuilder_;

    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public java.util.List<com.aliyun.polardbx.binlog.protocol.TxnMessage> getTxnMessageList() {
      if (txnMessageBuilder_ == null) {
        return java.util.Collections.unmodifiableList(txnMessage_);
      } else {
        return txnMessageBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public int getTxnMessageCount() {
      if (txnMessageBuilder_ == null) {
        return txnMessage_.size();
      } else {
        return txnMessageBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public com.aliyun.polardbx.binlog.protocol.TxnMessage getTxnMessage(int index) {
      if (txnMessageBuilder_ == null) {
        return txnMessage_.get(index);
      } else {
        return txnMessageBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public Builder setTxnMessage(
        int index, com.aliyun.polardbx.binlog.protocol.TxnMessage value) {
      if (txnMessageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTxnMessageIsMutable();
        txnMessage_.set(index, value);
        onChanged();
      } else {
        txnMessageBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public Builder setTxnMessage(
        int index, com.aliyun.polardbx.binlog.protocol.TxnMessage.Builder builderForValue) {
      if (txnMessageBuilder_ == null) {
        ensureTxnMessageIsMutable();
        txnMessage_.set(index, builderForValue.build());
        onChanged();
      } else {
        txnMessageBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public Builder addTxnMessage(com.aliyun.polardbx.binlog.protocol.TxnMessage value) {
      if (txnMessageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTxnMessageIsMutable();
        txnMessage_.add(value);
        onChanged();
      } else {
        txnMessageBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public Builder addTxnMessage(
        int index, com.aliyun.polardbx.binlog.protocol.TxnMessage value) {
      if (txnMessageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTxnMessageIsMutable();
        txnMessage_.add(index, value);
        onChanged();
      } else {
        txnMessageBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public Builder addTxnMessage(
        com.aliyun.polardbx.binlog.protocol.TxnMessage.Builder builderForValue) {
      if (txnMessageBuilder_ == null) {
        ensureTxnMessageIsMutable();
        txnMessage_.add(builderForValue.build());
        onChanged();
      } else {
        txnMessageBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public Builder addTxnMessage(
        int index, com.aliyun.polardbx.binlog.protocol.TxnMessage.Builder builderForValue) {
      if (txnMessageBuilder_ == null) {
        ensureTxnMessageIsMutable();
        txnMessage_.add(index, builderForValue.build());
        onChanged();
      } else {
        txnMessageBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public Builder addAllTxnMessage(
        java.lang.Iterable<? extends com.aliyun.polardbx.binlog.protocol.TxnMessage> values) {
      if (txnMessageBuilder_ == null) {
        ensureTxnMessageIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, txnMessage_);
        onChanged();
      } else {
        txnMessageBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public Builder clearTxnMessage() {
      if (txnMessageBuilder_ == null) {
        txnMessage_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        txnMessageBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public Builder removeTxnMessage(int index) {
      if (txnMessageBuilder_ == null) {
        ensureTxnMessageIsMutable();
        txnMessage_.remove(index);
        onChanged();
      } else {
        txnMessageBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public com.aliyun.polardbx.binlog.protocol.TxnMessage.Builder getTxnMessageBuilder(
        int index) {
      return getTxnMessageFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public com.aliyun.polardbx.binlog.protocol.TxnMessageOrBuilder getTxnMessageOrBuilder(
        int index) {
      if (txnMessageBuilder_ == null) {
        return txnMessage_.get(index);  } else {
        return txnMessageBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public java.util.List<? extends com.aliyun.polardbx.binlog.protocol.TxnMessageOrBuilder> 
         getTxnMessageOrBuilderList() {
      if (txnMessageBuilder_ != null) {
        return txnMessageBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(txnMessage_);
      }
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public com.aliyun.polardbx.binlog.protocol.TxnMessage.Builder addTxnMessageBuilder() {
      return getTxnMessageFieldBuilder().addBuilder(
          com.aliyun.polardbx.binlog.protocol.TxnMessage.getDefaultInstance());
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public com.aliyun.polardbx.binlog.protocol.TxnMessage.Builder addTxnMessageBuilder(
        int index) {
      return getTxnMessageFieldBuilder().addBuilder(
          index, com.aliyun.polardbx.binlog.protocol.TxnMessage.getDefaultInstance());
    }
    /**
     * <code>repeated .com.aliyun.polardbx.binlog.protocol.TxnMessage txnMessage = 1;</code>
     */
    public java.util.List<com.aliyun.polardbx.binlog.protocol.TxnMessage.Builder> 
         getTxnMessageBuilderList() {
      return getTxnMessageFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.aliyun.polardbx.binlog.protocol.TxnMessage, com.aliyun.polardbx.binlog.protocol.TxnMessage.Builder, com.aliyun.polardbx.binlog.protocol.TxnMessageOrBuilder> 
        getTxnMessageFieldBuilder() {
      if (txnMessageBuilder_ == null) {
        txnMessageBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.aliyun.polardbx.binlog.protocol.TxnMessage, com.aliyun.polardbx.binlog.protocol.TxnMessage.Builder, com.aliyun.polardbx.binlog.protocol.TxnMessageOrBuilder>(
                txnMessage_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        txnMessage_ = null;
      }
      return txnMessageBuilder_;
    }

    private java.util.List<com.google.protobuf.ByteString> txnMessageBytes_ = java.util.Collections.emptyList();
    private void ensureTxnMessageBytesIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        txnMessageBytes_ = new java.util.ArrayList<com.google.protobuf.ByteString>(txnMessageBytes_);
        bitField0_ |= 0x00000002;
       }
    }
    /**
     * <code>repeated bytes txnMessageBytes = 2;</code>
     * @return A list containing the txnMessageBytes.
     */
    public java.util.List<com.google.protobuf.ByteString>
        getTxnMessageBytesList() {
      return ((bitField0_ & 0x00000002) != 0) ?
               java.util.Collections.unmodifiableList(txnMessageBytes_) : txnMessageBytes_;
    }
    /**
     * <code>repeated bytes txnMessageBytes = 2;</code>
     * @return The count of txnMessageBytes.
     */
    public int getTxnMessageBytesCount() {
      return txnMessageBytes_.size();
    }
    /**
     * <code>repeated bytes txnMessageBytes = 2;</code>
     * @param index The index of the element to return.
     * @return The txnMessageBytes at the given index.
     */
    public com.google.protobuf.ByteString getTxnMessageBytes(int index) {
      return txnMessageBytes_.get(index);
    }
    /**
     * <code>repeated bytes txnMessageBytes = 2;</code>
     * @param index The index to set the value at.
     * @param value The txnMessageBytes to set.
     * @return This builder for chaining.
     */
    public Builder setTxnMessageBytes(
        int index, com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureTxnMessageBytesIsMutable();
      txnMessageBytes_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <code>repeated bytes txnMessageBytes = 2;</code>
     * @param value The txnMessageBytes to add.
     * @return This builder for chaining.
     */
    public Builder addTxnMessageBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureTxnMessageBytesIsMutable();
      txnMessageBytes_.add(value);
      onChanged();
      return this;
    }
    /**
     * <code>repeated bytes txnMessageBytes = 2;</code>
     * @param values The txnMessageBytes to add.
     * @return This builder for chaining.
     */
    public Builder addAllTxnMessageBytes(
        java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
      ensureTxnMessageBytesIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, txnMessageBytes_);
      onChanged();
      return this;
    }
    /**
     * <code>repeated bytes txnMessageBytes = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearTxnMessageBytes() {
      txnMessageBytes_ = java.util.Collections.emptyList();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }

    private int packetMode_ = 0;
    /**
     * <code>.com.aliyun.polardbx.binlog.protocol.PacketMode packetMode = 3;</code>
     * @return The enum numeric value on the wire for packetMode.
     */
    @java.lang.Override public int getPacketModeValue() {
      return packetMode_;
    }
    /**
     * <code>.com.aliyun.polardbx.binlog.protocol.PacketMode packetMode = 3;</code>
     * @param value The enum numeric value on the wire for packetMode to set.
     * @return This builder for chaining.
     */
    public Builder setPacketModeValue(int value) {
      
      packetMode_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>.com.aliyun.polardbx.binlog.protocol.PacketMode packetMode = 3;</code>
     * @return The packetMode.
     */
    @java.lang.Override
    public com.aliyun.polardbx.binlog.protocol.PacketMode getPacketMode() {
      @SuppressWarnings("deprecation")
      com.aliyun.polardbx.binlog.protocol.PacketMode result = com.aliyun.polardbx.binlog.protocol.PacketMode.valueOf(packetMode_);
      return result == null ? com.aliyun.polardbx.binlog.protocol.PacketMode.UNRECOGNIZED : result;
    }
    /**
     * <code>.com.aliyun.polardbx.binlog.protocol.PacketMode packetMode = 3;</code>
     * @param value The packetMode to set.
     * @return This builder for chaining.
     */
    public Builder setPacketMode(com.aliyun.polardbx.binlog.protocol.PacketMode value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      packetMode_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <code>.com.aliyun.polardbx.binlog.protocol.PacketMode packetMode = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearPacketMode() {
      
      packetMode_ = 0;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:com.aliyun.polardbx.binlog.protocol.DumpReply)
  }

  // @@protoc_insertion_point(class_scope:com.aliyun.polardbx.binlog.protocol.DumpReply)
  private static final com.aliyun.polardbx.binlog.protocol.DumpReply DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.aliyun.polardbx.binlog.protocol.DumpReply();
  }

  public static com.aliyun.polardbx.binlog.protocol.DumpReply getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<DumpReply>
      PARSER = new com.google.protobuf.AbstractParser<DumpReply>() {
    @java.lang.Override
    public DumpReply parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new DumpReply(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<DumpReply> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<DumpReply> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.aliyun.polardbx.binlog.protocol.DumpReply getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

